package libanalysis;

public class Checker {

//METODI BASE
	//scostamento
	public double scostamento(double p_actual, double p_standard){
		return p_actual - p_standard;
	}//Fine scostamento
	
	
	//METODI DERIVATI
	
	//colore
	public int allarme(double p_actual, double p_standard){
		
		double var_perc=0;
		
		var_perc=scostamento(p_actual, p_standard)/p_standard;
		
		
		//controllo
		if (var_perc<0) {
			return 0;
		}
		else{
			return (int) var_perc*10;
			
		}//Fine controllo
		
		
	}//Fine scostamento
	
	
	
	
	
	
}//End Class

